<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../common/common-include.jsp" %>
<%@ include file="../common/jquery-easyui.jsp" %>
<body>  
    <div class="easyui-layout" style="width:100%;height:100%;">  
        <div data-options="region:'north'" style="height:30px" align="center">
        Task Management
        </div>  
        <!-- <div data-options="region:'east',split:true" title="East" style="width:180px;"></div>   -->
        <div data-options="iconCls:'icon-redo',region:'west',split:true" title="菜单" style="width:200px;">
        	<jsp:include page="menu.jsp"></jsp:include>
        </div>  
        <div data-options="region:'center',iconCls:'icon-ok'" >  
        	<div id="main-center" class="easyui-tabs" >
        		<div title="主页" style="padding: 20px;" id="home">
                <h1>Welcome...</h1>
            	</div>
            	<div title="Help" data-options="iconCls:'icon-help',closable:true" style="padding: 20px;">
                <h1>Welcome...</h1>
            	</div>
        	</div>
        </div>  
        <div data-options="region:'south'" style="height:30px;" align="center">www.prms.com</div>  
    </div>  
</body>  
<script type="text/javascript">
$('#main-center').tabs({ 
	border:false,
	onSelect:function(title){
		//alert(title);
	}
}); 
 
function addTab(title,href){  
    var main = $('#main-center');   
    if (href){ 
    	var content = '<iframe scrolling="no" frameborder="0"  src="'+href+'" style="width:100%;height:90%;"></iframe>';   
    } else {   
    	var content = '未实现';   
    }   
    if (main.tabs('exists', title)){ 
    	//已存在则更新面板内容
    	main.tabs('select', title);   
        var tab = main.tabs('getSelected');  
        main.tabs('update',{  
            tab:tab,  
            options:{  
               		title:title,  
               		content:content,  
           			closable:true,  
           			fit:true,  
           			selected:true  
            }  
        });  
    } else{
    	//不存在则新建面板
    	main.tabs('add',{   
    	    title:title,   
    	    closable:true,   
    	    content:content   
    	    });
    }
}
</script>
